﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using HodhodNews;
using Googler.BLL;

namespace Googler
{
    public partial class PreviewForm : Form
    {
        public PreviewForm()
        {
            InitializeComponent();

        }

        public void Show(News item)
        {
            newsViewer1.NewsSource = new List<News>() { item };
            newsViewer1.Mode = NewsViewerMode.SingleItem;
            newsViewer1.DataBind();
            this.Show();
        }
        public void ShowDialog(News item)
        {
            newsViewer1.NewsSource = new List<News>() { item };
            newsViewer1.Mode = NewsViewerMode.SingleItem;
            newsViewer1.DataBind();
            this.ShowDialog();
        }
    }
}
